 class Sub extends Base {
     private int z;


     public Sub(int x, int y, int z) {
         super(x, y);//初始化父类成员变量
         this.z=z;//初始化子类成员变量

     }

     public int getZ() {
         return z;
     }

     public int calculate() {
         return super.getX() * super.getY() * this.getZ();
     }
}
